package com.ruan.service;

import com.ruan.entity.R;
import com.ruan.entity.ShoppingCart;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
* @author 59499
* @description 针对表【shopping_cart】的数据库操作Service
* @createDate 2023-09-15 20:00:27
*/
public interface ShoppingCartService extends IService<ShoppingCart> {

    R<Void> addShoppingCart(String skuOptions, String userId, Integer addressId, Integer spuId, int num);

    R<List<ShoppingCart>> getShoppingCartByUserId(String userId);

    R<Void> deleteShoppingCartById(Integer id);

    R<Void> editShoppingCart(Integer id, Integer addressId, Integer num);

    R<String> addShoppingCartOrder(Integer id);
}
